
#include "BScheduler.h"
using namespace blueberry;
BTimer::BTimer(UInt _uiInterval,BTimerCallback * _pTCB,bool _bIsRepeated,UInt _uiTimerID,BScheduler * _pEventMan, int _iTimerType):BItem(E_EVT_TIMER)
{
	ui_Interval = _uiInterval;
	ui_NextFire = 0;
	p_TimerCB = _pTCB;
	p_EventMan = _pEventMan;
	b_IsRepeated = _bIsRepeated;
	ui_TimerID = _uiTimerID;
	b_IsRemovedTimer = false;
	p_Data = NULL;
	i_TimerType = _iTimerType;
}
BTimerCallback::~BTimerCallback()
{}


BTimer::~BTimer()
{
	if(!b_IsRemovedTimer)
		p_EventMan->AddToDeletedTimerSet(ui_TimerID);
}
